$(function() {
    "use strict";
    //条形
    var bar = new Morris.Bar({
        element: 'bar-chart',
        resize: true,
        data: [
            {year: '1111', a: 15, b: 5},
            {year: '2222', a: 5, b: 25},
            {year: '3333', a: 35, b: 5},
            {year: '4444', a: 5, b: 45},
            {year: '5555', a: 55, b: 5},
            {year: '6666', a: 5, b: 65},
            {year: '7777', a: 71, b: 2}
        ],
        barColors: ['#00a65a', '#f56954'],
        xkey: 'year',
        ykeys: ['a', 'b'],
        ymax: 'auto 100',
        units: '',
        labels: ['CPU', 'DISK'],
        hideHover: 'true',
        hoverFillColor:'#00a65a'
    });
    //饼状
    var donut = new Morris.Donut({
        element:'sales-chart',
        resize: true,
        colors: ["#3c8dbc", "#f56954", "#00a65a"],
        data: [
            {label: "完成", value: 50},
            {label: "处理中", value: 30},
            {label: "待处理", value: 20}
        ],
        hideHover: 'true'
    });
    // 折线
    var line = new Morris.Line({
        element: 'line-chart',
        resize: true,
        data: [
            {year: '2011 Q1', data: 1000},
            {year: '2011 Q2', data: 8000},
            {year: '2011 Q3', data: 6000},
            {year: '2011 Q4', data: 4000},
            {year: '2012 Q1', data: 5000},
            {year: '2012 Q2', data: 6000},
            {year: '2012 Q3', data: 7000},
            {year: '2012 Q4', data: 6000},
            {year: '2013 Q1', data: 8000},
            {year: '2013 Q2', data: 10000},
            {year: '2013 Q3', data: 8000},
            {year: '2013 Q4', data: 10000}
        ],
        xkey: 'year',
        ykeys: ['data'],
        labels: ['数据1'],
        lineColors: ['#3c8dbc'],
        hideHover: 'true'
    });


});